<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // let不允许重复定义
        var name = 1234710


        var name = 7894561

        let age = 1234710

        // let age = 7418520

        console.log(name)
        console.log(age);

        // var  可以变量提升  先上船后买票
        // js具有预编译的特性

        console.log(sum);

        var sum =456
        // let不允许变量提升  先买票后上船
        console.log(tom);


        let tom = 888

    </script>
</body>
</html>